gtk4.git
5 years agomultiselection: Track items across resorts
Benjamin Otte [Sun, 21 Jun 2020 15:58:27 +0000 (17:58 +0200)]
multiselection: Track items across resorts

In particular, track which items remain in ::items-changed
signal emissions.

But the main use case is sorting, which causes items-changed(0, n, n)
to be emitted.

5 years agoRemove GtkSet
Benjamin Otte [Sun, 14 Jun 2020 05:08:44 +0000 (07:08 +0200)]
Remove GtkSet

It's been superceded by GtkBitset.

5 years agoselectionmodel: Remove select_callback() functions
Benjamin Otte [Sun, 14 Jun 2020 05:07:30 +0000 (07:07 +0200)]
selectionmodel: Remove select_callback() functions

gtk_selection_model_set_selection() takes care of those now.

5 years agolistbase: Port rubberband to gtk_selection_model_set_selection()
Benjamin Otte [Sun, 14 Jun 2020 04:50:22 +0000 (06:50 +0200)]
listbase: Port rubberband to gtk_selection_model_set_selection()

5 years agoselectionmodel: Add gtk_selection_model_set_selection()
Benjamin Otte [Sun, 14 Jun 2020 04:41:05 +0000 (06:41 +0200)]
selectionmodel: Add gtk_selection_model_set_selection()

Also port the testsuite.

5 years agoselectionmodel: Replace query_range() with get_selection()
Benjamin Otte [Sun, 14 Jun 2020 03:30:06 +0000 (05:30 +0200)]
selectionmodel: Replace query_range() with get_selection()

5 years agomultiselection: Port to GtkBitset
Benjamin Otte [Sat, 13 Jun 2020 03:27:34 +0000 (05:27 +0200)]
multiselection: Port to GtkBitset

5 years agotestsuite: Add tests for GtkBitset
Benjamin Otte [Sat, 13 Jun 2020 03:05:30 +0000 (05:05 +0200)]
testsuite: Add tests for GtkBitset

5 years agoAdd GtkBitset
Benjamin Otte [Wed, 10 Jun 2020 06:14:02 +0000 (08:14 +0200)]
Add GtkBitset

5 years agoAdd amalgamated roaring bitmaps source code
Benjamin Otte [Wed, 10 Jun 2020 05:39:25 +0000 (07:39 +0200)]
Add amalgamated roaring bitmaps source code

Taken from https://github.com/RoaringBitmap/CRoaring and fixed to
not spew warnings.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 25 Jun 2020 22:28:07 +0000 (22:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2149

5 years agoinspector: Adapt to dropdown api change
Matthias Clasen [Thu, 25 Jun 2020 20:40:54 +0000 (16:40 -0400)]
inspector: Adapt to dropdown api change

The suppported syntax for dropdowns in ui files
has changed. Get with the program.

5 years agodocs: Fix a typo
Matthias Clasen [Thu, 25 Jun 2020 18:29:24 +0000 (14:29 -0400)]
docs: Fix a typo

5 years agogtk-demo: Fix a typo in the listbox demo
Matthias Clasen [Thu, 25 Jun 2020 18:28:29 +0000 (14:28 -0400)]
gtk-demo: Fix a typo in the listbox demo

5 years agosearchentry: Update the docs slightly
Matthias Clasen [Thu, 25 Jun 2020 18:14:33 +0000 (14:14 -0400)]
searchentry: Update the docs slightly

Update the docs to get closer to describing reality.

5 years agoDrop unused includes
Matthias Clasen [Thu, 25 Jun 2020 12:03:10 +0000 (08:03 -0400)]
Drop unused includes

Don't include gtkfilechooserentry.h where it
isn't used.

5 years agostringfilter: Fix a typo
Matthias Clasen [Thu, 25 Jun 2020 02:08:09 +0000 (22:08 -0400)]
stringfilter: Fix a typo

5 years agoUpdate Turkish translation
Emin Tufan Çetin [Thu, 25 Jun 2020 01:05:12 +0000 (01:05 +0000)]
Update Turkish translation

5 years agoMerge branch 'wip/carlosg/input-cleanups' into 'master'
Matthias Clasen [Wed, 24 Jun 2020 21:32:30 +0000 (21:32 +0000)]
Merge branch 'wip/carlosg/input-cleanups' into 'master'

Some input cleanups

Closes #2851

See merge request GNOME/gtk!2147

5 years agoMerge branch 'scrolled-window-api' into 'master'
Matthias Clasen [Wed, 24 Jun 2020 19:58:03 +0000 (19:58 +0000)]
Merge branch 'scrolled-window-api' into 'master'

scrolledwindow: Don't take adjustments in new()

See merge request GNOME/gtk!2146

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 24 Jun 2020 19:50:37 +0000 (19:50 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2145

5 years agogtktextview: Remove child textview items last
Carlos Garnacho [Wed, 24 Jun 2020 18:19:03 +0000 (20:19 +0200)]
gtktextview: Remove child textview items last

The function tries to go through every child, so it's convenient
to remove all internal ones first.

5 years agogtkwidget: Drop _gtk_widget_[gs]et_shadowed()
Carlos Garnacho [Wed, 24 Jun 2020 15:31:03 +0000 (17:31 +0200)]
gtkwidget: Drop _gtk_widget_[gs]et_shadowed()

This API is meaningless now, with grab-notify being handled internally.

5 years agogtkwidget: Avoid use of shadowed flag
Carlos Garnacho [Wed, 24 Jun 2020 16:24:12 +0000 (18:24 +0200)]
gtkwidget: Avoid use of shadowed flag

This is going away, look up whether there is a grab, and whether
the widget is within it, instead.

5 years agogtkwidget: Drop gtk_widget_device_is_shadowed()
Carlos Garnacho [Wed, 24 Jun 2020 15:25:34 +0000 (17:25 +0200)]
gtkwidget: Drop gtk_widget_device_is_shadowed()

A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.

5 years agogtkwidget: Drop internal checks in grab-notify
Carlos Garnacho [Wed, 24 Jun 2020 15:23:11 +0000 (17:23 +0200)]
gtkwidget: Drop internal checks in grab-notify

There's no need to check if the widget is already shadowed, we
implicitly have that from the signal argument.

5 years agogtkmain: Make grab-notify notifications more targeted
Carlos Garnacho [Wed, 24 Jun 2020 15:19:57 +0000 (17:19 +0200)]
gtkmain: Make grab-notify notifications more targeted

We only want to send grab-notify to widgets that might have been
interacting with devices via events. Instead of going through all
widgets in all toplevels, we have the window/pointer focus information,
so we can just traverse the widget stacks for every involved foci.

5 years agogtkwidget: Drop ::grab-notify signal and vfunc
Carlos Garnacho [Wed, 24 Jun 2020 13:40:05 +0000 (15:40 +0200)]
gtkwidget: Drop ::grab-notify signal and vfunc

We don't expect widgets to react directly to these anymore.
Internally we still reset the controllers.

5 years agogtkprintoperation-win32: Don't track grab-notify
Carlos Garnacho [Wed, 24 Jun 2020 13:37:11 +0000 (15:37 +0200)]
gtkprintoperation-win32: Don't track grab-notify

Further grabs could presumably only come from events handled within
the dialog itself. It seems overeager to do this.

5 years agogtkvideo: Track child focus to determine whether controls should autohide
Carlos Garnacho [Wed, 24 Jun 2020 13:35:16 +0000 (15:35 +0200)]
gtkvideo: Track child focus to determine whether controls should autohide

Move away from grab_notify, and use the set_child_focus() vfunc to track
child widgets being set the keyboard focus. This is not 1:1, but seems
good enough at the moment.

5 years agogtkbutton: Drop grab_notify handler
Carlos Garnacho [Wed, 24 Jun 2020 12:17:15 +0000 (14:17 +0200)]
gtkbutton: Drop grab_notify handler

The click gesture already has a ::cancel handler, and does almost
everything it should. Move the last bits and remove the grab_notify
handler.

5 years agogtkspinbutton: Drop grab_notify handler
Carlos Garnacho [Wed, 24 Jun 2020 12:12:01 +0000 (14:12 +0200)]
gtkspinbutton: Drop grab_notify handler

The press gesture on the buttons already has a ::cancel handler,
this is redundant.

5 years agogtknotebook: Move away from grab_notify
Carlos Garnacho [Wed, 24 Jun 2020 12:10:42 +0000 (14:10 +0200)]
gtknotebook: Move away from grab_notify

Connect to ::cancel on the relevant gesture instead.

5 years agotestgtk: Update list of cursor names
Matthias Clasen [Wed, 24 Jun 2020 18:06:50 +0000 (14:06 -0400)]
testgtk: Update list of cursor names

Use the standard names, since that is what we want
everybody else to use too.

5 years agoInstall gtkstringlist.h
Matthias Clasen [Wed, 24 Jun 2020 17:01:34 +0000 (13:01 -0400)]
Install gtkstringlist.h

5 years agoentrycompletion: Various fixes
Matthias Clasen [Wed, 24 Jun 2020 04:26:27 +0000 (00:26 -0400)]
entrycompletion: Various fixes

Fix various issues that prevented inline completion
and inline selection from working reliably. We were
passing byte counts to gtk_editable_select_region in
one place, but that function expects char counts.
We were listening for GtkEditable::insert-text on
the GtkText widget, but that does not emit those signals,
so listen for GtkEntryBuffer::inserted-text instead.
Finally, we were not clearing the stored completion_prefix
enough, leading to situations where the stored prefix
does not match the text in the entry anymore.

5 years agogtk-demo: Enable inline completion
Matthias Clasen [Wed, 24 Jun 2020 04:27:21 +0000 (00:27 -0400)]
gtk-demo: Enable inline completion

Enable inline completion in the entry completion
demo, to have some code exercising this feature.
It is broken.

5 years agogtk-demo: Improve the entry completion demo
Matthias Clasen [Wed, 24 Jun 2020 02:39:16 +0000 (22:39 -0400)]
gtk-demo: Improve the entry completion demo

Add more strings.

5 years agoscrolledwindow: Don't take adjustments in new()
Matthias Clasen [Wed, 24 Jun 2020 15:25:09 +0000 (11:25 -0400)]
scrolledwindow: Don't take adjustments in new()

In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.

5 years agogtkwindowhandle: Drop has-grab checks
Carlos Garnacho [Wed, 24 Jun 2020 11:41:28 +0000 (13:41 +0200)]
gtkwindowhandle: Drop has-grab checks

While it's worth thinking about bringing the "windows can be dragged
with open popovers" behavior back, this does not kick in anymore, nor
should be the way to handle this given all the autoclose surface
semantic changes.

5 years agogdk: Drop gdk_device_get_last_event_surface()
Carlos Garnacho [Wed, 24 Jun 2020 09:20:15 +0000 (11:20 +0200)]
gdk: Drop gdk_device_get_last_event_surface()

This kind of transient state sets the expectative that events update
devices, while it's more accurate to say that devices generate events.
It does not make to expose this function anymore.

5 years agogtkwidget: Avoid poking surfaces and events in gtk_widget_list_devices()
Carlos Garnacho [Wed, 24 Jun 2020 09:14:52 +0000 (11:14 +0200)]
gtkwidget: Avoid poking surfaces and events in gtk_widget_list_devices()

This got stuck in ancient times when widgets were windowed, so the devices
in a window to know the devices in that widget would pan out. We do only
want here the devices that are inside the widget, not spread over the
surface, so rewrite this helper function to poke the toplevel foci, and
look they are contained inside the widget.

5 years agogtkwidget: Drop _gtk_widget_get_device_surface()
Carlos Garnacho [Tue, 23 Jun 2020 10:19:20 +0000 (12:19 +0200)]
gtkwidget: Drop _gtk_widget_get_device_surface()

A widget cannot have multiple surfaces anymore, nor needs to
fetch the last event surface as it ought to handle its own.

5 years agogtkmain: Drop unused struct field
Carlos Garnacho [Tue, 23 Jun 2020 10:15:00 +0000 (12:15 +0200)]
gtkmain: Drop unused struct field

Grabs are, ironically, not about devices anymore. This struct field
is never set.

5 years agogtkwidget: Remove dead code
Carlos Garnacho [Tue, 23 Jun 2020 09:15:04 +0000 (11:15 +0200)]
gtkwidget: Remove dead code

This variable got unused over time.

5 years agogdk: Depend less on gdk_event_get_device()
Carlos Garnacho [Tue, 23 Jun 2020 09:00:46 +0000 (11:00 +0200)]
gdk: Depend less on gdk_event_get_device()

For the most part, we are interested in seats here.

5 years agogdk: Add gdk_event_get_seat()
Carlos Garnacho [Mon, 22 Jun 2020 23:14:53 +0000 (01:14 +0200)]
gdk: Add gdk_event_get_seat()

It currently fetches the seat from the event device, will be changed
in future commits.

5 years agogdk: Drop gdk_seat_get_logical_pointers()
Carlos Garnacho [Mon, 22 Jun 2020 22:24:12 +0000 (00:24 +0200)]
gdk: Drop gdk_seat_get_logical_pointers()

Events come from hardware devices and are handled by controllers,
there's no need to use logical pointers, nor to peek them. Drop this
unused API.

5 years agogdk: Drop GdkGrabOwnership
Carlos Garnacho [Mon, 22 Jun 2020 21:54:46 +0000 (23:54 +0200)]
gdk: Drop GdkGrabOwnership

We no longer expose such low level tweaks, this is essentially
unused.

5 years agogdk: Drop supports_multidevice API
Carlos Garnacho [Mon, 22 Jun 2020 21:34:34 +0000 (23:34 +0200)]
gdk: Drop supports_multidevice API

Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.

5 years agogdk: Drop GDK_SOURCE_ERASER
Carlos Garnacho [Mon, 22 Jun 2020 21:19:35 +0000 (23:19 +0200)]
gdk: Drop GDK_SOURCE_ERASER

All tools come from devices with GDK_SOURCE_PEN.

5 years agogtkmain: Look up transient-for hierarchies to determine modality
Carlos Garnacho [Mon, 22 Jun 2020 13:31:36 +0000 (15:31 +0200)]
gtkmain: Look up transient-for hierarchies to determine modality

Windows that are not modal, but are transient-for a modal window should
still be able to receive and handle events. Inspect the window hierarchy
in those cases, so these windows are handled just like widgets within
the modal dialog.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2851
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/2850

5 years agogtkwidget: Cancel all gestures in other groups
Carlos Garnacho [Fri, 19 Jun 2020 16:50:51 +0000 (18:50 +0200)]
gtkwidget: Cancel all gestures in other groups

When a gesture (group) claims a sequence, all other gesture groups
in the same widget should get cancelled. Not just previously claimed
ones, that shouldn't happen actually.

5 years agoMerge branch 'stringlist' into 'master'
Matthias Clasen [Tue, 23 Jun 2020 20:43:49 +0000 (20:43 +0000)]
Merge branch 'stringlist' into 'master'

add a public stringlist api

See merge request GNOME/gtk!2134

5 years agoAdd GtkStringList as public api
Matthias Clasen [Sun, 21 Jun 2020 22:00:29 +0000 (18:00 -0400)]
Add GtkStringList as public api

This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.

5 years agoMerge branch 'wip/jimmac/notebook-legibility' into 'master'
Matthias Clasen [Tue, 23 Jun 2020 19:12:52 +0000 (19:12 +0000)]
Merge branch 'wip/jimmac/notebook-legibility' into 'master'

Adwaita: notebook legibility fixes

Closes #2652

See merge request GNOME/gtk!2142

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 23 Jun 2020 19:10:54 +0000 (19:10 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2141

5 years agoAdwaita: notebook legibility fixes
Jakub Steiner [Tue, 23 Jun 2020 17:54:54 +0000 (19:54 +0200)]
Adwaita: notebook legibility fixes

- make inactive tabs more legible

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652

5 years agoAdd a few missing includes
Matthias Clasen [Sun, 21 Jun 2020 22:03:39 +0000 (18:03 -0400)]
Add a few missing includes

These sources are using GtkListStore apis,
but were replying on indirect includes to
get the header. Make this explicit, to prepare
for GtkEntryCompletion losing its tree view
dependencies.

5 years agoentry completion: Drop the Private struct
Matthias Clasen [Sun, 21 Jun 2020 19:28:56 +0000 (15:28 -0400)]
entry completion: Drop the Private struct

This is in preparation for porting GtkEntryCompletion
to use GtkListView.

5 years agoMerge branch 'wip/fencing-without-context-is-discouraged' into 'master'
Ray Strode [Tue, 23 Jun 2020 09:53:35 +0000 (09:53 +0000)]
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'

x11: Ensure bound context is compatible with sync fence

See merge request GNOME/gtk!2139

5 years agox11: Ensure bound context is compatible with sync fence
Ray Strode [Mon, 22 Jun 2020 21:13:54 +0000 (17:13 -0400)]
x11: Ensure bound context is compatible with sync fence

Commit a0f6ff101e781aaf0a931be6e22f2885f4f69e04 made sure that a
context was bound before calling glClientWaitSync, but it doesn't
check that the context shares objects with the context that created
the fence.

This commit does a little more validation before deciding the current
context is good enough.

5 years agoMerge branch 'wip/fencing-without-context-is-discouraged' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 23:01:11 +0000 (23:01 +0000)]
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'

x11: ensure some context is bound before calling glClientWaitSync

See merge request GNOME/gtk!2138

5 years agoMerge branch 'drop-entry-completion-actions' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 22:59:17 +0000 (22:59 +0000)]
Merge branch 'drop-entry-completion-actions' into 'master'

entrycompletion: Drop action support

See merge request GNOME/gtk!2136

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 22:13:30 +0000 (22:13 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Add a basic clipboard test

See merge request GNOME/gtk!2137

5 years agox11: ensure some context is bound before calling glClientWaitSync
Ray Strode [Mon, 22 Jun 2020 21:13:54 +0000 (17:13 -0400)]
x11: ensure some context is bound before calling glClientWaitSync

Since commit 972134abe48a4c9c7b6ad41b0723f30f4e7ae16b we now call
glClientWaitSync for the vendor nvidia driver, to know when a frame
is ready for the compositor to process.

glClientWaitSync can be called regardless of which context is currently
bound, but if no context is bound at all, it returns 0 without
doing anything.

This commit checks for that edge case, and ensures a context gets
made current in the event no context is already current, before calling
glClientWaitSync.

5 years agoAdd a basic clipboard test
Matthias Clasen [Mon, 22 Jun 2020 20:36:22 +0000 (16:36 -0400)]
Add a basic clipboard test

This is not reproducing the failure I'm after, unfortunately.

5 years agoentrycompletion: Drop action support
Matthias Clasen [Mon, 22 Jun 2020 18:12:45 +0000 (14:12 -0400)]
entrycompletion: Drop action support

This api has not really been kept up with current
user experiences in popups, and we're better off
just dropping it and letting people do their own
popups if they need custom UI.

5 years agoMerge branch 'keyval-to-uni-fix' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 18:13:25 +0000 (18:13 +0000)]
Merge branch 'keyval-to-uni-fix' into 'master'

gdk: Make gdk_keyval_to_unicode platform-independent

See merge request GNOME/gtk!2132

5 years agoMerge branch 'fix-entry-completion' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 17:56:43 +0000 (17:56 +0000)]
Merge branch 'fix-entry-completion' into 'master'

Fix entry completion

See merge request GNOME/gtk!2135

5 years agogdk: Clarify the docs of gdk_keyval_to_unicode
Matthias Clasen [Mon, 22 Jun 2020 17:24:34 +0000 (13:24 -0400)]
gdk: Clarify the docs of gdk_keyval_to_unicode

Explicitly state that the conversion does not
take locale into account, and point out GDK_KEY_KP_Decimal
as a candidate for special-casing.

5 years agoentry completion: Make keynav work again
Matthias Clasen [Mon, 22 Jun 2020 16:48:42 +0000 (12:48 -0400)]
entry completion: Make keynav work again

Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.

5 years agoAdd gtk_widget_prepend_controller
Matthias Clasen [Mon, 22 Jun 2020 16:47:27 +0000 (12:47 -0400)]
Add gtk_widget_prepend_controller

Add a variant of gtk_widget_add_controller that
inserts the controller at the beginning, instead
of the end. This will be used in entry completion
to make sure the entry completion key event handling
supersedes the entry one while the popup is open.

Keep this private for now, until we determine if
it needs to be public api.

5 years agoFix change notification for event controllers
Matthias Clasen [Mon, 22 Jun 2020 16:46:12 +0000 (12:46 -0400)]
Fix change notification for event controllers

We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.

5 years agoentrycompletion: Name the controllers
Matthias Clasen [Mon, 22 Jun 2020 16:31:15 +0000 (12:31 -0400)]
entrycompletion: Name the controllers

This helps with debugging.

5 years agoMerge branch 'wip/dont-assert-without-evidence' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 15:47:27 +0000 (15:47 +0000)]
Merge branch 'wip/dont-assert-without-evidence' into 'master'

x11: be more verbose when glClientWaitSync behaves unexpectedtly

See merge request GNOME/gtk!2133

5 years agox11: be more verbose when glClientWaitSync behaves unexpectedtly
Ray Strode [Mon, 22 Jun 2020 15:07:32 +0000 (11:07 -0400)]
x11: be more verbose when glClientWaitSync behaves unexpectedtly

When given a 0 timeout, glClientWaitSync is only supposed to return one
of three possible values:

 - GL_ALREADY_SIGNALED - fence fired
 - GL_WAIT_FAILED - there was an error
 - GL_TIMEOUT_EXPIRED - fence hasn't fired yet

In addition, it can also return GL_CONDITION_SATISFIED if a non-zero
timeout is passed, and the fence fires while waiting on the timeout.

Since commit 972134abe48a4c9c7b6ad41b0723f30f4e7ae16b we now call
glClientWaitSync (with a 0 timeout), but one user is reporting it's
returning some value that's not one of the above four.

This commit changes the g_assert to a g_error so we can see what
value is getting returned.

May help with https://gitlab.gnome.org/GNOME/gtk/-/issues/2858

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 13:11:13 +0000 (13:11 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

gtk-demo: Add a warning to the colors demo

See merge request GNOME/gtk!2131

5 years agogdk: Make gdk_keyval_to_unicode platform-independent
Matthias Clasen [Mon, 22 Jun 2020 12:31:10 +0000 (08:31 -0400)]
gdk: Make gdk_keyval_to_unicode platform-independent

The result of gdk_keyval_to_unicode should not depend
on the platform.

5 years agoMerge branch 'master.msvc' into 'master'
Timm Bäder [Mon, 22 Jun 2020 12:02:26 +0000 (12:02 +0000)]
Merge branch 'master.msvc' into 'master'

demos: Fix builds against Visual Studio headers

See merge request GNOME/gtk!2130

5 years agogtk-demo: Add a warning to the colors demo
Matthias Clasen [Mon, 22 Jun 2020 11:43:47 +0000 (07:43 -0400)]
gtk-demo: Add a warning to the colors demo

Explain that the big sizes cause lockups.

5 years agodemos: Fix builds against Visual Studio headers
Chun-wei Fan [Mon, 22 Jun 2020 09:04:18 +0000 (17:04 +0800)]
demos: Fix builds against Visual Studio headers

According to [1], '_timezone' is already used for a global variable in the
time.h system header that is supplied by Microsoft, so using that for our
variable name when we are including time.h either directly or indirectly
will cause trouble.

This renames such variables to '_tz' to avoid that

[1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname

5 years agoMerge branch 'port-icon-browser' into 'master'
Matthias Clasen [Mon, 22 Jun 2020 00:09:00 +0000 (00:09 +0000)]
Merge branch 'port-icon-browser' into 'master'

Port icon browser

See merge request GNOME/gtk!2127

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sun, 21 Jun 2020 17:57:31 +0000 (17:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

filter: Make GtkEveryFilter buildable

See merge request GNOME/gtk!2125

5 years agoPort the icon browser to GtkGridView
Matthias Clasen [Mon, 8 Jun 2020 18:25:54 +0000 (14:25 -0400)]
Port the icon browser to GtkGridView

5 years agofilter: Make GtkEveryFilter buildable
Matthias Clasen [Sun, 21 Jun 2020 17:07:08 +0000 (13:07 -0400)]
filter: Make GtkEveryFilter buildable

Due to an oversight, when multi filters were split into
any and every, any ended up with the listmodel and buildable
implementations, and every didn't get any.

Move the implementations up.

5 years agoMerge branch 'wip/otte/listview-colors' into 'master'
Matthias Clasen [Sun, 21 Jun 2020 12:49:49 +0000 (12:49 +0000)]
Merge branch 'wip/otte/listview-colors' into 'master'

Improve listview-colors demo

See merge request GNOME/gtk!2123

5 years agogtk-demo: Cosmetic improvement to the colors demo
Matthias Clasen [Sun, 21 Jun 2020 05:06:58 +0000 (01:06 -0400)]
gtk-demo: Cosmetic improvement to the colors demo

Make the count label not jump around, as the model
is refilled.

5 years agogtk-demo: Add an "Unsorted" option (and default to it)
Benjamin Otte [Sun, 21 Jun 2020 04:54:21 +0000 (06:54 +0200)]
gtk-demo: Add an "Unsorted" option (and default to it)

Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).

5 years agosortlistmodel: Look at order
Benjamin Otte [Sun, 21 Jun 2020 04:53:44 +0000 (06:53 +0200)]
sortlistmodel: Look at order

For now, we just look at SORT_ORDER_NONE to bypass any sorting.

5 years agogtk-demo: Reinstate incremental filling
Benjamin Otte [Sun, 21 Jun 2020 03:21:11 +0000 (05:21 +0200)]
gtk-demo: Reinstate incremental filling

Do it via the new size setting on the color list.

Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.

Hint: Do not select 16777216.

This reinstates commit c16848c2bb683f7ddf51571aa5951f8a4a1ea622.

5 years agogtk-demo: Allow color list to have any size
Benjamin Otte [Sun, 21 Jun 2020 02:44:52 +0000 (04:44 +0200)]
gtk-demo: Allow color list to have any size

For now, limit it to 1<<12 so the sorters don't explode.

5 years agogtk-demo: Add a permutation to compute colors from the position
Benjamin Otte [Sun, 21 Jun 2020 02:11:24 +0000 (04:11 +0200)]
gtk-demo: Add a permutation to compute colors from the position

This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.

5 years agogtk-demo: Add custom listmodel for all true colors.
Benjamin Otte [Fri, 19 Jun 2020 21:47:56 +0000 (23:47 +0200)]
gtk-demo: Add custom listmodel for all true colors.

5 years agogtk-demo: Make colors demo contain all 16,777,216 colors
Benjamin Otte [Fri, 19 Jun 2020 01:59:59 +0000 (03:59 +0200)]
gtk-demo: Make colors demo contain all 16,777,216 colors

This makes it slightly slow, so not sure it should stay like this.

5 years agogtk-demo: Compute HSV values directly
Benjamin Otte [Tue, 16 Jun 2020 20:24:56 +0000 (22:24 +0200)]
gtk-demo: Compute HSV values directly

5 years agoRevert "gtk-demo: Make the colors demo populate incrementally"
Benjamin Otte [Sun, 21 Jun 2020 01:56:53 +0000 (03:56 +0200)]
Revert "gtk-demo: Make the colors demo populate incrementally"

This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.

This reverts commit a10340859df6aec405d9b6fc6e25c4790137af85.

5 years agogtk-demo: Embed the RGBA value
Benjamin Otte [Tue, 16 Jun 2020 19:11:25 +0000 (21:11 +0200)]
gtk-demo: Embed the RGBA value

5 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 21 Jun 2020 11:47:05 +0000 (14:47 +0300)]
Updated Lithuanian translation

5 years agoUpdate Polish translation
Piotr Drąg [Sun, 21 Jun 2020 09:37:46 +0000 (11:37 +0200)]
Update Polish translation